package com.hqully.smartfumehood.entity;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * <p>
 *     通风柜数据实体类
 * </p>
 * @author liulingyu
 * @date 2022-06-24 10:36
 * @version 1.0
 */
@Data
public class FumeHoodData implements Serializable {
    /**
     * 
     */
    private Long id;

    private Long APId;

    /**
     * 
     */
    private Long vavId;

    /**
     * 
     */
    private Float speedS;

    /**
     * 
     */
    private Float dis;

    /**
     * 
     */
    private Integer angle;

    /**
     * 
     */
    private Integer openCtrl;

    /**
     * 
     */
    private Integer mode;

    /**
     * 
     */
    private Integer openLight;

    /**
     * 
     */
    //@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime time;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        FumeHoodData other = (FumeHoodData) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))

            && (this.getAPId() == null ? other.getAPId() == null : this.getAPId().equals(other.getAPId()))
            && (this.getVavId() == null ? other.getVavId() == null : this.getVavId().equals(other.getVavId()))
            && (this.getSpeedS() == null ? other.getSpeedS() == null : this.getSpeedS().equals(other.getSpeedS()))
            && (this.getDis() == null ? other.getDis() == null : this.getDis().equals(other.getDis()))
            && (this.getAngle() == null ? other.getAngle() == null : this.getAngle().equals(other.getAngle()))
            && (this.getOpenCtrl() == null ? other.getOpenCtrl() == null : this.getOpenCtrl().equals(other.getOpenCtrl()))
            && (this.getMode() == null ? other.getMode() == null : this.getMode().equals(other.getMode()))
            && (this.getOpenLight() == null ? other.getOpenLight() == null : this.getOpenLight().equals(other.getOpenLight()))
            && (this.getTime() == null ? other.getTime() == null : this.getTime().equals(other.getTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAPId() == null) ? 0 : getAPId().hashCode());
        result = prime * result + ((getVavId() == null) ? 0 : getVavId().hashCode());
        result = prime * result + ((getSpeedS() == null) ? 0 : getSpeedS().hashCode());
        result = prime * result + ((getDis() == null) ? 0 : getDis().hashCode());
        result = prime * result + ((getAngle() == null) ? 0 : getAngle().hashCode());
        result = prime * result + ((getOpenCtrl() == null) ? 0 : getOpenCtrl().hashCode());
        result = prime * result + ((getMode() == null) ? 0 : getMode().hashCode());
        result = prime * result + ((getOpenLight() == null) ? 0 : getOpenLight().hashCode());
        result = prime * result + ((getTime() == null) ? 0 : getTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", APId=").append(APId);
        sb.append(", vavId=").append(vavId);
        sb.append(", speedS=").append(speedS);
        sb.append(", dis=").append(dis);
        sb.append(", angle=").append(angle);
        sb.append(", openCtrl=").append(openCtrl);
        sb.append(", mode=").append(mode);
        sb.append(", openLight=").append(openLight);
        sb.append(", time=").append(time);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}